package com.example.bankend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.bankend.entity.Card;
import com.example.bankend.vo.UserResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author luolinila
 * @date 2025/6/18 09:45
 */
@Mapper
public interface CardMapper extends BaseMapper<Card> {
    public Long insertCard(Card card);
    public List<String> selectAllCardID();
    public Card getCardByID(String cardID);
    public void updateBalance(@Param("cardID") String cardID, @Param("balance") BigDecimal money);
    public void deleteCard(String cardID);
    public void changeCardPass(@Param("cardID") String cardID, @Param("pass") String pass);
    public void handelLoss(String cardID);
    public void restoreUse(String cardID);

    List<Card> selectAllCard(Long adminID, String adminName, String adminPass);

    void updatePass(String cardID, String newPass);


    List<String> selectAllCardIDByID(Long customerID);
}
